Blue Monday again!
沒事ㄉ,我們今天的進度延續前兩天的基本語法,今天來介紹boolean(布林值)
布林值是什麼概念呢?
boolean呈現方式為以下兩種:
true  真
false 假
那false 的情況有以下五種
x = 100;
Boolean(x); // true
x = '';
Boolean(x); // false
x = 'hi';
Boolean(x); // true
x = null;
Boolean(x); // false
boolean程式碼:
<body>
    
    <p id="demo"></p>
    
    <script>
        let x = "";
        let x2='hi';
        let x3=null;
        document.getElementById("demo").innerHTML =
        "100 is " + Boolean(100) + "<br>" +
        "'' is " + Boolean("") + "<br>" +
        "hi is " + Boolean(x2) + "<br>" +
        "null is " + Boolean(x3) + "<br>"       
    </script>
</body>
網頁呈現:

另外
網頁呈現:
小公主遇到瓶頸了!當我將javascript開成另個檔案連接的時候,會出現奇怪錯誤 qwq
live reload enabled 到底什麼鬼(他就真的看起來很討厭ㄟ!氣死!)

參考資料:
https://www.fooish.com/javascript/boolean.html
https://medium.com/tkd-giant/javascript-%E5%85%A5%E9%96%80-84c4cb12d083